<?php


namespace app\apiadmin\controller;


use app\apiadmin\service\system\MemberService;
use app\common\controller\BaseController;
use app\common\service\CaptchaService;
use app\common\utils\Res;
use think\facade\Cache;

class Login extends BaseController
{

    /**
     * @return mixed
     * 验证码
     */
    public function verify() {
        return app()->make(CaptchaService::class)->create();
    }


    public function login() {
        $param = $this->request->post();
        return MemberService::login($param);
    }

    public function logout() {
        //Cache::delete('');
        return Res::ok();
    }
    
    public function clear() {
        //Cache::delete('');
        return Res::ok();
    }

}